extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[普通]SG雷达"
	att.atk = 60
	att.mgiAtk = 60
	price = 300
	info = "雷达锁定当前目标，使其额外承受30%的伤害\n[color=#DC143C]同时装备三件时可升级[/color]"
func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"run")

func run(atkInfo):
	if atkInfo.atkType == sys.AtkType.GUN and not atkInfo.hitCha.hasBuff("b_SG") and atkInfo.hitCha.team != atkInfo.atkCha.team:
		atkInfo.hitCha.addBuff(b_SG.new(-0.3))
	
class b_SG:
	extends "../../azurlane_ctrl/AzurBuff.gd"
	func _init(num = -0.15):
		attInit()
		id = "b_SG"	
		buffName = "SG雷达"
		isNegetive = true
		att.defR = num

func upgrade():
	name = "[color=#FFFF00][史诗]SG雷达"
	info = "雷达锁定当前目标，使其额外承受30%的伤害"
	att.atk = 100
	att.mgiAtk = 100